"""
asr factory
"""
from common.const import ASRType
from common.log import logger


def create_asr(asr_type):
    """
    create a asr type instance
    :param asr_type: asr type code
    :return: asr instance
    """
    if asr_type == ASRType.SENSE_VOICE:
        from asr.sense_voice.sense_voice_asr import SenseVoiceASR
        return SenseVoiceASR()
    logger.error("not asr type!")
    raise RuntimeError
